package CollectionTask;

import java.util.Arrays;
import java.util.List;

public class ArrayList {
    public static void main(String[] args) {
        /*String[]array={"one","two","three","four","five"};//创建数组
        System.out.println("array:"+array);

        List<String>list= Arrays.asList(array);//将数组转换为集合
        System.out.println("list:"+list);

        array[1]="陷阱";
        System.out.println("array:"+Arrays.toString(array));
        System.out.println("list:"+list);

        list.set(2,"seven");
        System.out.println("list:"+list);
        System.out.println("array:"+Arrays.toString(array));
        System.out.println("list:"+list);*/


        String[]array={"大貔貅","东北老表","酒蒙子","二大爷","山东老乡"};
        System.out.println("array:"+array);

        List<String>list=Arrays.asList(array);
        System.out.println("list:"+list);
        array[1]="大灰狼";
        System.out.println("array:"+Arrays.toString(array));

        list.set(3,"小灰灰");
        System.out.println("list:"+list);
        System.out.println("array"+Arrays.toString(array));



    }
}
